<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>九九乘法表第2遍</title>
</head>
<body>
<script>
    for(var a=1;a<=9;a++){
        for(var b=1;b<=a;b++){
            document.write(b+"*"+a+"="+b*a+"&nbsp;&nbsp;&nbsp;&nbsp;");
        }
        document.write("<br/>");
    }

    document.write("<br/>");
    document.write("<br/>");
    for (var j=9;j>=1;j--){
        for(var i=1;i<=j;i++){
            document.write(i+"*"+j+"="+i*j+"&nbsp;&nbsp;&nbsp;&nbsp;");
        }
        document.write("<br/>");
    }
    document.write("<br/>");
    document.write("<br/>");
    //第2种方式
    var aarry=[100,200,300,400,500,600];
    var sum=0;
    for (i in aarry){
        document.write(aarry[i]+"&nbsp;");
    }

    for (i in aarry){
        sum=sum+aarry[i];
    }
    document.write(sum+"&nbsp;");
</script>
</body>
</html>